package top.hudk.rpc.rpc1;

import java.io.Serializable;
import java.util.Arrays;

/**
 * 作用：方法调用信息封装
 * 实现Serializable以支持序列化
 *
 * @author hudk
 * @date 2020/12/10 10:27
 */
public class RpcMsg implements Serializable {

    /**
     * 调用方法所在的类名称
     */
    private String className;
    /**
     * 调用方法名称
     */
    private String methodName;
    /**
     * 方法的参数类型列表
     */
    private Class[] methodParamType;
    /**
     * 方法参数
     */
    private Object[] args;

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getMethodName() {
        return methodName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    public Class[] getMethodParamType() {
        return methodParamType;
    }

    public void setMethodParamType(Class[] methodParamType) {
        this.methodParamType = methodParamType;
    }

    public Object[] getArgs() {
        return args;
    }

    public void setArgs(Object[] args) {
        this.args = args;
    }

    @Override
    public String toString() {
        return "RpcMsg{" +
                "className='" + className + '\'' +
                ", methodName='" + methodName + '\'' +
                ", methodParmType=" + Arrays.toString(methodParamType) +
                ", params=" + Arrays.toString(args) +
                '}';
    }
}
